assistant: Use gtk_widget_class_set_accessible_type()
authorBenjamin Otte <otte@redhat.com>
Wed, 6 Jul 2011 16:34:50 +0000 (18:34 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 6 Jul 2011 16:47:00 +0000 (18:47 +0200)
Less code and no leaks!

gtk/gtkassistant.c

index 6adbd8b521d90c8282abd7309b578f08a23bd496..8526efce9107d497fb2dd757c30bc00259de096c 100644 (file)
@@ -150,8 +150,6 @@ static void     gtk_assistant_get_child_property (GtkContainer      *container,
                                                   GValue            *value,
                                                   GParamSpec        *pspec);
 
-static AtkObject *gtk_assistant_get_accessible   (GtkWidget         *widget);
-
 static void       gtk_assistant_buildable_interface_init     (GtkBuildableIface *iface);
 static GObject   *gtk_assistant_buildable_get_internal_child (GtkBuildable  *buildable,
                                                               GtkBuilder    *builder,
@@ -171,6 +169,8 @@ static void       gtk_assistant_buildable_custom_finished    (GtkBuildable  *bui
 static GList*     find_page                                  (GtkAssistant  *assistant,
                                                               GtkWidget     *page);
 
+GType             _gtk_assistant_accessible_get_type         (void);
+
 enum
 {
   CHILD_PROP_0,
@@ -213,7 +213,8 @@ gtk_assistant_class_init (GtkAssistantClass *class)
   widget_class->map = gtk_assistant_map;
   widget_class->unmap = gtk_assistant_unmap;
   widget_class->delete_event = gtk_assistant_delete_event;
-  widget_class->get_accessible = gtk_assistant_get_accessible;
+
+  gtk_widget_class_set_accessible_type (widget_class, _gtk_assistant_accessible_get_type ());
 
   container_class->add = gtk_assistant_add;
   container_class->remove = gtk_assistant_remove;
@@ -2267,17 +2268,6 @@ _gtk_assistant_accessible_init (GtkAssistantAccessible *self)
 {
 }
 
-static AtkObject *
-gtk_assistant_get_accessible (GtkWidget *widget)
-{
-  AtkObject *obj;
-
-  obj = (AtkObject*)g_object_new (_gtk_assistant_accessible_get_type (), NULL);
-  atk_object_initialize (obj, widget);
-
-  return obj;
-}
-
 /* buildable implementation */
 
 static GtkBuildableIface *parent_buildable_iface;